package javaClassDesign.equals.hashcode;

public class EqualsHashcode {

	int int1;

	boolean b1;

	@Override
	public int hashCode() {
		int prime = 31;
		int result = 1;
		result = prime * result + (b1 ? 1231 : 1237);
		result = prime * result + int1;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EqualsHashcode other = (EqualsHashcode) obj;
		if (b1 != other.b1)
			return false;
		if (int1 != other.int1)
			return false;
		return true;
	}

}
